package cc.vv.baselibrary.bean;

import android.os.Parcel;
import android.os.Parcelable;

import cc.vv.baselibrary.bean.base.BaseEntityObj;


/**
 * 文件对象
 * Created by sun.li on 2017/9/8.
 */

public class FileObj extends BaseEntityObj implements Parcelable {

    /**
     * 文件对应本地上传名称
     */
    private String requestName;

    /**
     * 应用id
     */
    private String appId;

    /**
     * 应用名称
     */
    private String appName;

    /**
     * 模块名称
     */
    private String module;
    /***
     * 业务名称
     */
    private String business;
    /***
     * 用户id
     */
    private String entityId;

    /**
     * 原图地址
     */
    private String path;

    /**
     * 缩略图地址
     */
    private String zoomPath;

    /**
     * 压缩后宽度
     */
    private int width;

    /**
     * 压缩后高度
     */
    private int height;

    /**
     * 原图宽度
     */
    private int w;

    /**
     * 原图高度
     */
    private int h;

    /**
     * 文件真实名称
     */
    private String realName;

    /**
     * 文件后缀
     */
    private String fileExt;

    /**
     * 转换后的大小
     */
    private String fileSize;

    /**
     * 原始大小
     */
    private String realSize;

    /**
     * 备注
     */
    private String remark;
    /***
     * 上传消耗时间
     */
    private long uploadTime;

    /***
     * 视频截图
     */
    private String videoCapturePath;

    /***
     * 视频时长(秒)
     */
    private String duration;

    /**
     * 获取应用id
     */
    public String getAppId() {
        return appId;
    }

    /**
     * 设置应用id
     */
    public void setAppId(String appId) {
        this.appId = appId;
    }

    /**
     * 获取应用名称
     */
    public String getAppName() {
        return appName;
    }

    /**
     * 设置应用名称
     */
    public void setAppName(String appName) {
        this.appName = appName;
    }

    /**
     * 获取原图地址
     */
    public String getPath() {
        return path;
    }

    /**
     * 设置原图地址
     */
    public void setPath(String path) {
        this.path = path;
    }

    /**
     * 获取缩略图地址
     */
    public String getZoomPath() {
        return zoomPath;
    }

    /**
     * 设置缩略图地址
     */
    public void setZoomPath(String zoomPath) {
        this.zoomPath = zoomPath;
    }

    /**
     * 获取压缩后宽度
     */
    public int getWidth() {
        return width;
    }

    /**
     * 设置压缩后宽度
     */
    public void setWidth(int width) {
        this.width = width;
    }

    /**
     * 获取压缩后高度
     */
    public int getHeight() {
        return height;
    }

    /**
     * 设置压缩后高度
     */
    public void setHeight(int height) {
        this.height = height;
    }

    /**
     * 获取原图宽度
     */
    public int getW() {
        return w;
    }

    /**
     * 设置原图宽度
     */
    public void setW(int w) {
        this.w = w;
    }

    /**
     * 获取原图高度
     */
    public int getH() {
        return h;
    }

    /**
     * 设置原图高度
     */
    public void setH(int h) {
        this.h = h;
    }

    /**
     * 获取文件真实名称
     */
    public String getRealName() {
        return realName;
    }

    /**
     * 设置文件真实名称
     */
    public void setRealName(String realName) {
        this.realName = realName;
    }

    /**
     * 获取文件后缀
     */
    public String getFileExt() {
        return fileExt;
    }

    /**
     * 设置文件后缀
     */
    public void setFileExt(String fileExt) {
        this.fileExt = fileExt;
    }

    /**
     * 获取转换后的大小
     */
    public String getFileSize() {
        return fileSize;
    }

    /**
     * 设置转换后的大小
     */
    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    /**
     * 获取原始大小
     */
    public String getRealSize() {
        return realSize;
    }

    /**
     * 设置原始大小
     */
    public void setRealSize(String realSize) {
        this.realSize = realSize;
    }

    /**
     * 获取备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取请求名称
     */
    public String getRequestName() {
        return requestName;
    }

    /**
     * 设置请求名称
     */
    public void setRequestName(String requestName) {
        this.requestName = requestName;
    }

    /**
     * 获取模块名称
     */
    public String getModule() {
        return module;
    }

    /**
     * 设置模块名称
     */
    public void setModule(String module) {
        this.module = module;
    }

    /***
     *获取业务名称
     */
    public String getBusiness() {
        return business;
    }

    /***
     * 设置业务名称
     */
    public void setBusiness(String business) {
        this.business = business;
    }

    /***
     * 获取用户id
     */
    public String getEntityId() {
        return entityId;
    }

    /***
     * 设置用户id
     */
    public void setEntityId(String entityId) {
        this.entityId = entityId;
    }

    /***
     * 获取上传消耗时间
     */
    public long getUploadTime() {
        return uploadTime;
    }

    /***
     * 设置上传消耗时间
     */
    public void setUploadTime(long uploadTime) {
        this.uploadTime = uploadTime;
    }

    /***
     * 获取视频截图
     */
    public String getVideoCapturePath() {
        return videoCapturePath;
    }

    /***
     * 设置视频截图
     */
    public void setVideoCapturePath(String videoCapturePath) {
        this.videoCapturePath = videoCapturePath;
    }

    /***
     * 获取视频时长(秒)
     */
    public String getDuration() {
        return duration;
    }

    /***
     * 设置视频时长(秒)
     */
    public void setDuration(String duration) {
        this.duration = duration;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.appId);
        dest.writeString(this.appName);
        dest.writeString(this.path);
        dest.writeString(this.zoomPath);
        dest.writeInt(this.width);
        dest.writeInt(this.height);
        dest.writeInt(this.w);
        dest.writeInt(this.h);
        dest.writeString(this.realName);
        dest.writeString(this.fileExt);
        dest.writeString(this.fileSize);
        dest.writeString(this.realSize);
        dest.writeString(this.remark);
    }

    public FileObj() {
    }

    protected FileObj(Parcel in) {
        this.appId = in.readString();
        this.appName = in.readString();
        this.path = in.readString();
        this.zoomPath = in.readString();
        this.width = in.readInt();
        this.height = in.readInt();
        this.w = in.readInt();
        this.h = in.readInt();
        this.realName = in.readString();
        this.fileExt = in.readString();
        this.fileSize = in.readString();
        this.realSize = in.readString();
        this.remark = in.readString();
    }

    public static final Parcelable.Creator<FileObj> CREATOR = new Parcelable.Creator<FileObj>() {
        @Override
        public FileObj createFromParcel(Parcel source) {
            return new FileObj(source);
        }

        @Override
        public FileObj[] newArray(int size) {
            return new FileObj[size];
        }
    };

    @Override
    public String toString() {
        return "FileObj{" +
                "requestName='" + requestName + '\'' +
                ", appId='" + appId + '\'' +
                ", appName='" + appName + '\'' +
                ", module='" + module + '\'' +
                ", business='" + business + '\'' +
                ", entityId='" + entityId + '\'' +
                ", path='" + path + '\'' +
                ", zoomPath='" + zoomPath + '\'' +
                ", width=" + width +
                ", height=" + height +
                ", w=" + w +
                ", h=" + h +
                ", realName='" + realName + '\'' +
                ", fileExt='" + fileExt + '\'' +
                ", fileSize='" + fileSize + '\'' +
                ", realSize='" + realSize + '\'' +
                ", remark='" + remark + '\'' +
                ", uploadTime=" + uploadTime +
                ", videoCapturePath='" + videoCapturePath + '\'' +
                ", duration='" + duration + '\'' +
                '}';
    }
}
